﻿using FreeSql.DataAnnotations;
using FreeSqlExtend;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SystemEntity
{
    /// <summary>
    /// 访问拦截记录日志实体
    /// </summary>
    [Table(Name = "System_ActionLog")]
    [SubTable]
    public class ActionLogEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Column(IsPrimary = true,IsIdentity =true)]
        public long Id { get; set; }
        /// <summary>
        /// 请求Id
        /// </summary>
        public string RequestId { get; set; }
        /// <summary>
        /// 接口Id
        /// </summary>
        public Guid UrlId { get; set; }
        /// <summary>
        /// 访问方式
        /// </summary>
        public string Method { get; set; }
        /// <summary>
        /// 请求参数
        /// </summary>
        [Column(StringLength = 5000)]
        public string RequestData { get; set; }
        /// <summary>
        /// 返回参数
        /// </summary>
        [Column(StringLength = 5000)]
        public string ResponseData { get; set; }
        /// <summary>
        /// 请求时间
        /// </summary>
        public long StartTimeTicks { get; set; }
        /// <summary>
        /// 返回时间
        /// </summary>
        public long EndTimeTicks { get; set; }
        /// <summary>
        /// 消耗时间（秒）
        /// </summary>
        public Double IntervalTicks { get; set; }
    }
}
